<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <button id="btn-edit" th:onclick="'javascript:loadEditData(\'' + @{/banner/edit(editType='ADD')} + '\')'" class="btn btn-sm btn-success">新增</button>
            </div>
            <div class="panel-body">
                <!-- Show Data -->
                <table class="table table-striped table-hover table-bordered">
                    <tr class="text-center">
                        <th class="col-sm-1">#</th>
                        <th>Banner</th>
                        <th>是否使用</th>
                        <th>序号</th>
                        <th>链接</th>
                        <th>创建时间</th>
                        <th class="col-sm-2">操作</th>
                    </tr>
                    <tbody>
                        <tr th:each="obj,stat : ${data}">
                            <td th:text="${stat.count}"></td>
                            <td class="text-center"><img class="banner-style" th:src="#{system.base.url} + ${obj.url}" src=""/></td>
                            <td th:text="${obj.isUse == true ? '是' : '否'}"></td>
                            <td th:text="${obj.sequence}"></td>
                            <td th:text="${obj.link}"></td>
                            <td th:text="${#dates.format(obj.createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                            <td><button class="btn btn-sm btn-danger btn-lit" type="button"
                                        th:onclick="'javascript:loadDeleteData(\'' + @{/banner/delete(id=${obj.id})} + '\')'">删除
                            </button></td>
                        </tr>
                    </tbody>
                </table>
                <div class="bottom-no-data" th:if="${data.totalPages eq 0}">对不起~没有数据~</div>
                <!-- Pagination -->
                <div th:include="~{common/pagination :: pagin}"></div>
            </div>
        </div>
    </div>
</div>

